package com.xw.dao;

import com.xw.model.Orders;
import com.xw.util.MyMapper;
import com.xw.vo.OrdersVo;
import com.xw.vo.VideosVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public interface OrdersMapper extends MyMapper<Orders> {

    List<OrdersVo> findOrderByUserId(@Param("userId") String userId,@Param("status") Integer status);

    List<OrdersVo> findByWhere(@Param("startTime")String startTime,@Param("endTime") String endTime,@Param("ordersStatus") Integer ordersStatus,@Param("videoName") String videoName,@Param("teacherName") String teacherName);

    List<OrdersVo> findOrdersByPublishUserId(@Param("userId") String userId);

    double findTotalMoney(@Param("userId") String userId);

    double findWhereByTotalMoney(@Param("startTime")String startTime,@Param("endTime") String endTime,@Param("ordersStatus") Integer ordersStatus,@Param("videoName") String videoName,@Param("teacherName") String teacherName);

    List<OrdersVo> findOrdersByPublishVideo(@Param("videoId")String videoId);

    double findOrdersTotalMoney(@Param("videoId")String videoId);

    Integer dealWithOverTimeOrders();

    List<OrdersVo> findOrderByUserIdMP(@Param("userId") String userId,@Param("status") Integer status);
}